// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from "./store";

Vue.config.productionTip = false

Vue.directive("my-input", {
  inserted: function (element) {
    element.focus();
  },
})
Vue.directive("change-style", {
  inserted(element, binding) {
    console.log(binding);
    element.style.color = binding.value.color;
    element.style.fontSize = binding.value.fontSize;
  },
  update(element, binding) {
    console.log(binding);
    element.style.color = binding.value.color;
    element.style.fontSize = binding.value.fontSize;
  },
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router, // 注册路由
  store,  // 注册vuex中的状态管理器
  components: {App},
  template: '<App/>'
})
